package xx.shiro.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import xx.shiro.entity.SysPermissions;

import java.util.List;

/**
 * (SysPermissions)表数据库访问层
 *
 * @author halo-king
 * @since 2023-09-26 10:28:10
 */
public interface SysPermissionsMapper extends BaseMapper<SysPermissions> {
    @Select(" select t1.* from sys_permissions t1 inner join sys_roles_permissions t2 on t1.id = t2.permission_id where t2.role_id =#{roleId}")
    List<SysPermissions> queryPermissionByRoleId(Integer roleId);
}

